Adding options & fix trailing coma bug