Big cleanup and documentation
no need for checking
renamed
more settings
remove dead code