added Q, moved public API to single file