Clean up code, clarify and remove an unnecessary try-except-block