fixed some inconsistencies and unpolluted namespace