moved most Ruby code into lib/, left a smaller check script at the root
change how options get passed around, lay groundwork for paging/archive