Restructure of tests and minor edits