Initial implementation completed (NO TESTING DONE YET).
Corrections and Main.java added.