Some code cleanup + upped to development version of maddon