Thread safety + code standards