Cosmology With Type Ia Supernovae: Robust Techniques For Data Analysis And Photometric Classification