added fixdisplay for rebel at work
cleaned up structure