Implemented 10s rule. Added JavaDocs and comments.