Cleanup of code and added author attributes