updated constructor. comments and cleanup