modified unit tests to match new structure, fixed problems with
availability checks