Removed some orphaned code and added necessary documentation.