Fixed the logger and cleaned some shit up