refactory code && add support to syntastic check