Add tests for variable input. Refactor astah file creation for tests.