Added more doc comments and cleaned up more