All code is now commented and more or less clean. Closes #41.