Some major cleanup required, but inline is now working