Refactored basic library significantly, but sending isn't working properly.