More functional, misc improvements