Updated documentation
Cleaned up code a little. Removed unnecessary variables, etc.