Worked on various bugfixes.