Set shiftwidth, implement data, refactor functions