added comments + javadoc, remoced undeeded imports + main methods