Added exception safety, need better comments/docs