removed some commenting, cleaned up formatting