bunch of changed to get everything working, will add back functionallity / cleanup code next.