Several fixes, added controller support