Cleaned unused code, fixed coding standard