Refactoring

Added explicit includes and function header comments