fix up the layouts a little
filter the classes list to remove empties
better radio and checkbox tests using the 'assertTag' function instead of simple string comparison.