Code organized a little bit
Resolved merge conflict