Quite a few changes/fixes to the (un)indent code functions, added replace 4 spaces with tab (perhaps change this later to replace scintilla's tab width in spaces with a tab).