fixes for tabs as spaces and indentation
proper access check (performance issues with old check)
Merge pull request #23 from cfoellmann/master

Code needed some fixing on the side