Reviewed comments, removed unused code and eliminated magic strings