(SEG FAULT 11) some general cleanup / optimisations