Cleaned up the code. Removed unused functions and changed description.