Fix mobile view and cleanup code