Added more strict types. Formatting. Copyright fixes