Remove test form stuff, fix getopt handling