Changed log types, fixed a few bugs