Better formatting of exceptions
Remove unused module
Replace hardcoded values by config options