More complex tests and a couple bug fixes