Completed tests and fixes