A little bit better solution

This solves a few codestyle issues and uses a slightly better solution. Please merge this and then we can find some testers. :-)