Fixed several bugs and modified the way assignments are being hoisted