Refactored source, began javadoc