Various fixes, lint and forgotten commented out lines