Added logic layer and connected it to drawing layer