Restructured some tests and improved commit validation