remove unused hashie gem and use constants for regexs