Further code overhauling.