Cleaned up the code a bit, added returnvalue where one was missing, rather sure its never used anywhere tho