More work done on testing tool. It is a messy code but what matters is that it works ;)