Basecode, to be fixed and optiized'

'