Code refactoring
Added require loop handler + some bug fixes