Basic stuff

Main code, all in WIN32 at the moment but will port to UNIX & OSX later