Added bit api (main.lua changes)