add betters errors integration. for development env only
add main method in rb script. some comments too.