Refactoring on rgb lamp