Work in progress : some changes besfore adding GUI