refector and remove unused layout