Gh huge refactor with el6 support