Minor tweaks
Organized functions by use