Altered some code to meet standards