updated to follow code standards, general cleanup