Please fix your code formatting. You should stick with spaces for tabs (in this file there is a mix of spaces and tabs). Also make sure your indentation is constant. Functions should have a constant number of indent spaces. Each next nesting block should be indented properly. Etc.

This does really make it easier to read code = )