Moved shield tools to their own file and added unit tests for them.