Change to neater lib directories

also attempting to get matricies working, results are limited