Moved some code from gentool and vehtool to rfactortools/