Updated bootrapper and cleaned up the code