Removed unnecessary imports and added javadoc