Fixing errors and changed functionality.