Removed unused code, fixed coding style.