Squashed commit of the following:

commit 4d48e4ec1943d28c4a4d70c540941e9fbe1184bf
Author: diego2k <diego2k@gmail.com>
Date:   Thu Jan 10 21:52:48 2013 -0300

    Fixed bugs and added improves