Added more tests & fixed a bug with module references as a result