Created removeComponent function and added test