Incorporated controller

Many changes