Updated a bunch of code to leverage the new derived properties mechanism. Did some other minor cleanup.