reindent, update redo and undo functions

now with opacity changes depending on the states
also the queue is implemented properly now (i hope)