removed dead code, removed custom type casting, added bingint support, changed tabs to spaces