readme updated, small fixes, global variable removed