Move some code to GAIA. Clean up pom.xml.