improve code style (untabify, optimize using) and fix issue #25