Added dist curve, DrawText function, correct or wrong, spritecommand, some more factoring