Added dev-settings for repo safety.
Many bugfixes since the last commit.