Eliminated commented code and changed code style a bit