Added license.
More cleanup. Switched to generic method from generic class. Added slf4j logging instead of direct log4j dep.