Add META-INF filters
Fix build errors and set connection field