setup init code and cleanup unnecessary console.logs