Minor improvements

Should make things more organized and easier to maintain.