Updated to follow coding standards