Add more cost columns. Constraints table
Slice fetching based on shortest distance. Added constraint function. Refactor internal datastructures