optimize split operations, remove unneeded constants