Lots of fixes, lots of logs (closes #22)