Remove unwanted lines and add in optional form selector