Changed behavior on end of textbuffer
Added constants for textbuffer dimensions
Changed init function