Fixed NullPointerExceptions, added Custom Logger
Code cleanup