Got things working (for the most part)