Improved split logic