mailform fixes

All the bugs are gone i think, need to get the popup form working but for now its a modified  version.