Remove dependency on the can.Construct and reorganize the code