Initial code release

Squashed commit of the following:

commit 00be9ce7b650997b9090c5fe1b0f58a7dc7c74a7
Author: Nick Brook <nick.brook@ratemyplacement.co.uk>
Date:   Mon Mar 11 17:34:04 2013 +0000

    Fixed bugs and added PHPUnit test (not yet working)

    Signed-off-by: Nick Brook <nick.brook@ratemyplacement.co.uk>

commit 686aca88d8fdc08c4ec4e14ba3b2a8cc5f805d0a
Author: Nick Brook <nick.brook@ratemyplacement.co.uk>
Date:   Mon Mar 11 16:24:08 2013 +0000

    First code commit

    Signed-off-by: Nick Brook <nick.brook@ratemyplacement.co.uk>

Signed-off-by: Nick Brook <nick.brook@ratemyplacement.co.uk>