Adding snippet method
Adding preferences support