Compacted the console log calls
Added some functions