More useless code extracted and added variables for color to be defined by user