Added the rest class
Added rest class and writer.py
Added rests to writer.py