formatting
more refactoring
better Exceptions