Added connect, orientation and custom handlers