move controls to lib