Applied more fixes from modulization work