Implemented main loop stub