Fixed some bugs, but not all yet.

Settings menu still contains bugs.