Added support for pre-conditions (requires) and added a limit function for testing.