some small fixes & initial scoping