Restructure and expand tests