Fixed some bugs, introduced a bit more design