Some refactoring
Added dynamic resource to load files
Some unnessesary System.out.println() calls removed