Cleaned up pattern validators (which need tests) and added network tests while fixing issues.