Continued implementing prefrix assignment algorithm

+Still very incomplete