Some minor fixes, views don't work yet. Will do tomorrow.