Implemented suggestions by @infograf768