changed license to GNU GPL v2 & tidied up