formatted the code a bit
added docs to the class