Fixed tests to work with PS. Added more tests