restructured the code into packages

as suggested by dethstar in issue #141, i have restructured the java classes into appropriate packages