Minor code fixes, last push for the night