Code cleanup and removed unused elements.