Cleanup and fix updating position