Clean up code from previous implementation