Added handling of action being passed in URL and amendments to php class files, constructors moved into parent classes and method scope changed.