Removed dependency on StarX and refactored everything again for StarX.