Add some tests and some final fixes/updates

More tests to come ;)