Restructuring and cleaning up /lib

Signed-off-by: Matt Keys <matt@uptrending.com>