Moved option generation routines to a separate file. Also moved remov…