Cleaned up add author js code