Fixed Implementation

Fixed the Implementation of the class and put some basic comments in.