The first thing needed was to move SLP code to where it belongs.
Every high level calls like requesting a msn transfer, an user display and stuff to the upper layer of the stack (slp.[ch]) this was easy because most of the SLP code was there so the file needed a cleanup.
Every SLP protocol decode and management, like sending acks, an 200OK after the invite and stuff, to the SlpCall module, most of that code was on slp.c and some other on slplink.
Every interaction with link layers, splitting the SlpMessage in Parts in SlpLink module.
Most of this changes were mostly cut-paste changes, still a lot of functions needed to be exported as public so the other modules can use them, it was not so painful.
Get MsnMessage out of here!
Since the code was designed to be used to transfer data using the Switchboard, all the code was populated with MsnMessages which is a representation of the MSG SB command.that is used to send the SlpMessages to the SB server. Since I wanted to get this stack agnostic of link layer it was needed to get the MsnMessage out of the way. It was hard since this object was used as the core of some of the functionality, most of the cases it was replaced by a SlpMessage.
This change was really big because it imply get away every SB code from the SLP stack and abstract it in some way that can be used any of the link layers.