Add Titan library dependency and fix minor issues