More tests, bugfixes and cleanup for port. Also added couple new assertation methods to test_utils