Added a few helper methods
Minor refactoring
Added summary comments