Cleaned up some code & comments