Some major refactoring of webapptest to make usage easier