Fixed minor feature file errors, refactor some code for increased test
reliability