Cosmetical changes + some better error handling