Cleaned up code - added comments

Signed-off-by: Dave <davidajberner@gmail.com>