Cleanup: Fix code format, remove hardcoded value and add some documentation