work on gui. fix overlay bug. remove dead code.