Moved back the code.. should be rewritten to something good.