Refactored to achieve initial compile. NOT YET TESTED. Titan-hadoop broken.