Code cleanup and added documentation

Added standard documentation to interface methods and did some more code
cleanup.