Various changes. Added some functionality from Rant.