Clean up structure; syntax; refactor errors; eliminate deprecated tests