Kohana code style and check for connection