performance enhacements and beautification