Fixed some things. Added a logger and some other
stuff.