some much needed cleanup. still needs /more/