Started following Google coding style, refined registration process