Cleaned up variable declaration, adds lots of comments