Reworked some existing functionality.