Objectified quickly the code, still nasty spaghetti code