Now, the code is still as ugly as hell can be.. Hope I can get rid of the uglyness before public
_________________________