Cleaned up a bit

Added some comments and removed a few unused elements.