Clean up and fixes

Should fix last commit. Sorry for the mistake.