Clean up code and fix moving tabs in tab tree
Source files shouldn't have executable bit set
Use scoped pointer for Ui in plugins