Optimised som stuff added a few Comments , removed all System.out and added proper logging