Added imports + some code cleaning